package com.dubbo.yumeko.consumer;

import com.dubbo.yumeko.DemoService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "start")
public class DemoController {
    @Reference(version = "1.0.0")
    private DemoService demoService;

    @RequestMapping(value = "remote")
    @ResponseBody
    public String RemoteUser(@RequestParam("name") String name){
        return demoService.sayHello(name);
    }
}
